import request from '@/util/index.js'

export function getOrderList(params) {
	return request({
		url: '/pad/prod/schOrder/page',
		method: 'get',
		data: params
	})
}

// 获取标签列表
export function getTagList(params) {
	return request({
		url: '/inventorPrint',
		method: 'get',
		data: params
	})
}

// 添加标签
export function addTagInfo(data) {
	return request({
		url: '/inventorPrint',
		method: 'post',
		data: data
	})
}

//添加库位调整
export function moveAdjust(data) {
	return request({
		url: '/moveAdjust',
		method: 'post',
		data: data
	})
}

// 合单接口
export function mergeOrder(data) {
	return request({
		url: '/wms/sync/merge',
		method: 'post',
		data: data
	})
}

export function mergeOrderOut(data) {
	return request({
		url: '/wms/sync/mergeOut',
		method: 'post',
		data: data
	})
}

// 获取跟踪号
export function getTrack(data) {
	return request({
		url: '/hl/track',
		method: 'get',
		data: data
	})
}

// 刷新入库单接口
export function refreshInList(data) {
	return request({
		url: '/wms/sync/refreshIn',
		method: 'get',
		data: data
	})
}

export function refreshOutList(data) {
	return request({
		url: '/wms/sync/refreshOut',
		method: 'get',
		data: data
	})
}

export function getMoveAdjust(data) {
	return request({
		url: '/moveAdjust',
		method: 'get',
		data: data
	})
}

export function scanReturn(data) {
	return request({
		url: '/wms/sync/getReturnInfo',
		method: 'get',
		data: data
	})
}

export function getMoveAdjustDetail(data) {
	return request({
		url: '/moveAdjust/' + data,
		method: 'get'
	})
}

// 扫描流转卡查询物料
export function getMatialInfo(params) {
	return request({
		url: '/inventorPrint/getInfoByFlowCard',
		method: 'get',
		data: params
	})
}

// 库存查询
export function getStockListData(params) {
	return request({
		url: '/hl/stock',
		method: 'get',
		data: params
	})
}

// 扫描获取入库单详情
export function getScanDetails(params) {
	return request({
		url: '/wms/sync/inStorage/scanDetails',
		method: 'get',
		data: params
	})
}

// 扫描获取出库单详情
export function getOutScanDetails(params) {
	return request({
		url: '/wms/sync/outStorage/scanDetails',
		method: 'get',
		data: params
	})
}

// 扫描标签功能
export function scanLabel(params) {
	return request({
		url: '/inventorPrint/getByLabelNo/' + params,
		method: 'get'
	})
}

// 入库操作
export function createOrder(data) {
	return request({
		url: '/wms/sync/create',
		method: 'post',
		data: data
	})
}

export function createReturnOrder(data) {
	return request({
		url: '/wms/sync/createReturnInfo',
		method: 'post',
		data: data
	})
}

export function createOrderNew(data) {
	return request({
		url: '/wms/sync/createInOutOrder',
		method: 'post',
		data: data
	})
}

// 获取库位列表
export function getStockInfo(params) {
	return request({
		url: '/wms/sync/stock',
		method: 'post',
		data: params
	})
}

// stockNew
export function getStockNewInfo(params) {
	return request({
		url: '/wms/sync/stockNew',
		method: 'post',
		data: params
	})
}

// 获取计量单位
export function getBaseunit(params) {
	return request({
		url: '/baseunit',
		method: 'get',
		data: params
	})
}

export function checkUser() {
	return request({
		url: '/wms/sync/check',
		method: 'get',
	})
}

// 扫描出库标签
export function stockByLabel(params) {
	return request({
		url: '/wms/sync/stockByLabel/' + params,
		method: 'get',
	})
}

// 扫描出库标签(新)
export function stockByLabelNew(params) {
	return request({
		url: '/wms/sync/stockByLabel',
		method: 'get',
		data: params
	})
}

// 获取入库信息
export function getInStorageListData(params) {
	return request({
		url: '/wms/sync/inStorage/List',
		method: 'get',
		data: params
	})
}

// 获取出入库信息
export function getStorageInfo(params) {
	return request({
		url: '/wip/order',
		method: 'get',
		data: params
	})
}

export function getStorageInfoNew(params) {
	return request({
		url: '/wip/log',
		method: 'get',
		data: params
	})
}

// 入库单详情
export function getStorageDetail(params) {
	return request({
		url: '/wip/order/details/' + params,
		method: 'get'
	})
}

// 获取出库信息
export function getOutStorageListData(params) {
	return request({
		url: '/wms/sync/outStorage/List',
		method: 'get',
		data: params
	})
}

// 获取库位信息
export function getBwlInfoList(params) {
	return request({
		url: '/wms/sync/bwlInfo',
		method: 'get',
		data: params
	})
}

export function getBwlInfoListNew(params) {
	return request({
		url: '/wms/sync/bwlInfoNew',
		method: 'get',
		data: params
	})
}

// 获取物料信息
export function getBaseinventoryinfo(params) {
	return request({
		url: '/baseinventoryinfo',
		method: 'get',
		data: params
	})
}

//获取列表数量
export function getOrderCount(params) {
	return request({
		url: '/pad/prod/schOrder/getStateCount',
		method: 'get',
		data: params
	})
}

// 获取esop数据
export function getEsop(params) {
	return request({
		url: '/pad/prodTechSet/getSettings',
		method: 'get',
		data: params
	})
}

// 获取标准工序
export function getPtaList(params) {
	return request({
		url: '/planttecharchives',
		method: 'get',
		data: params
	})
}

// 获取下一工单
export function getNextOrder(params) {
	return request({
		url: `/pad/prod/schwork/order/${params}`,
		method: 'get'
	})
}

// 获取生产组织
export function getBpaList(params) {
	return request({
		url: '/baseproductionarchives/tree',
		method: 'get',
		data: params
	})
}

// 获取工艺参数信息
export function getProdTechParameter(params) {
	return request({
		url: '/pad/prodTechParameter',
		method: 'get',
		data: params
	})
}

// 获取工艺参数检查项目
export function getItemList(params) {
	return request({
		url: `/pad/prodTechParameter/itemList/${params}`,
		method: 'get'
	})
}

// 添加工艺参数
export function addProdTechParameter(params) {
	return request({
		url: '/pad/prodTechParameter',
		method: 'post',
		data: params
	})
}

// 获取安灯规则
export function getRuleList(params) {
	return request({
		url: '/andonruleinfo/findEx',
		method: 'get',
		data: params
	})
}


// 获取安灯列表
export function getAndenList(params) {
	return request({
		url: '/andonlogs/findList',
		method: 'get',
		data: params
	})
}

// 获取安灯维修列表
export function getRepairAndenList(params) {
	return request({
		url: '/hl/andon/findList',
		method: 'get',
		data: params
	})
}


export function deletePrint(params) {
	return request({
		url: '/inventorPrint/' + params,
		method: 'delete',
	})
}

// 获取异常统计数量
export function getabnormalCount(params) {
	return request({
		url: '/device/abnormal/rectify/detailCount',
		method: 'get',
		data: params
	})
}

// 获取安灯维修列表
export function getRectifyList(params) {
	return request({
		url: '/device/abnormal/rectify/dtlPage',
		method: 'get',
		data: params
	})
}

//异常整改
export function modifyRectify(data) {
	return request({
		url: '/device/abnormal/rectify/solve',
		method: 'post',
		data: data
	})
}

// 获取异常整改详情
export function RectifyDtl(dardId) {
	return request({
		url: '/device/abnormal/rectify/detail/spares/' + dardId,
		method: 'get',
	})
}

// 获取保养备件详情
export function maintainSpareDtl(dmdId) {
	return request({
		url: '/maintain/record/detail/spare/' + dmdId,
		method: 'get',
	})
}

// 添加安灯记录
export function addAndon(data) {
	return request({
		url: '/andonlogs/addLog',
		method: 'post',
		data: data
	})
}

// 确认安灯
export function comfirmAndon(data) {
	return request({
		url: '/andonlogs/confirmUpdate',
		method: 'post',
		data: data
	})
}

// 手动升级
export function updateAndon(data) {
	return request({
		url: '/andonlogs/upgradeLog',
		method: 'post',
		data: data
	})
}

// 生产报工
export function proReport(data) {
	return request({
		url: '/pad/prod/work/report',
		method: 'post',
		data: data
	})
}

// 获取字典配置
export function getDicList(params) {
	return request({
		url: `/data-items/${params}/detail/tree`,
		method: 'get'
	})
}

// 获取人员信息
export function getUserList(params) {
	return request({
		url: `/users/page?Company_Id=55585e3b6bb582e15e51aa5ee4904296`,
		method: 'get',
		data: params
	})
}

export function getReportList(params) {
	return request({
		url: `/pad/prod/work/report/page`,
		method: 'get',
		data: params
	})
}

// 获取报工详情
export function getReportDetail(params) {
	return request({
		url: `/pad/prod/work/report/${params}`,
		method: 'get',
	})
}

// 获取物料信息
export function getInventoryList(params) {
	return request({
		url: `/baseinventoryinfo`,
		method: 'get',
		data: params
	})
}

// 获取客户信息
export function getCustomerList(params) {
	return request({
		url: `/customer`,
		method: 'get',
		data: params
	})
}

// 新增投料
export function addMaterial(data) {
	return request({
		url: '/pad/prodInputMaterial/save',
		method: 'post',
		data: data
	})
}

// 获取投料列表
export function getPutMaterialList(params) {
	return request({
		url: `/pad/prodInputMaterial/page`,
		method: 'get',
		data: params
	})
}

// 获取投料标准
export function getFeedStandard(params) {
	return request({
		url: `/pad/prodInputMaterial/getStandard`,
		method: 'get',
		data: params
	})
}

// 开工
export function startOrder(data) {
	return request({
		url: '/pad/prod/schwork/order/start',
		method: 'post',
		data: data
	})
}

// 完工
export function completeOrder(data) {
	return request({
		url: '/pad/prod/schwork/order/complete',
		method: 'post',
		data: data
	})
}

// 暂停取消暂停
export function editOrder(data) {
	return request({
		url: '/pad/prod/schwork/order/editState',
		method: 'post',
		data: data
	})
}


// 查询未投料列表
export function getFedPage(params) {
	return request({
		url: `/pad/prod/work/report/fedPage`,
		method: 'get',
		data: params
	})
}

export function getNotFedPage(params) {
	return request({
		url: `/pad/prod/work/report/notFedPage`,
		method: 'get',
		data: params
	})
}

// 投料报工
export function inputFeeding(data) {
	return request({
		url: '/pad/prod/work/report/input',
		method: 'post',
		data: data
	})
}

// 获取翻译
export function transalteLang(params) {
	return request({
		url: `/lp-map/${params}/name`,
		method: 'get'
	})
}

//获取质检项目接口
export function getQualityItem(params) {
	return request({
		url: `/devicequalityitem`,
		method: 'get',
		data: params
	})
}

// 点检项目详情
export function getQualityDetail(params) {
	return request({
		url: `/devicequalityitem/${params}`,
		method: 'get'
	})
}

// 添加点检
export function addProddevicecheck(data) {
	return request({
		url: '/proddevicecheck',
		method: 'post',
		data: data
	})
}

// 获取点检记录列表
export function getProddevicecheck(data) {
	return request({
		url: '/proddevicecheck',
		method: 'get',
		data: data
	})
}

//详情接口
export function getProddevicecheckDetail(data) {
	return request({
		url: `/proddevicecheck/${data}`,
		method: 'get'
	})
}

// 获取物流等信息
export function getOtherInfo(data) {
	return request({
		url: '/prod/schwork/order/page',
		method: 'get',
		data: data
	})
}

// 查询抽样申请记录
export function getPageQualityOrderList(data) {
	return request({
		url: '/yokequalityordermanage/getPageQualityOrderList',
		method: 'get',
		data: data
	})
}

// 
export function getQualityItemInfoList(data) {
	return request({
		url: '/yokequalityordermanage/getQualityItemInfoList',
		method: 'post',
		data: data
	})
}

// 查询详情
export function getQualityItemDetail(data) {
	return request({
		url: `/yokequalityordermanage/getQualityOrderItemList/${data}`,
		method: 'get',
	})
}

// 删除抽样申请
export function deleteQualityOrder(data) {
	return request({
		url: `/yokequalityordermanage/deleteQualityOrder`,
		method: 'post',
		data: data
	})
}

// 添加检验
export function addQualityOrder(data) {
	return request({
		url: `/yokequalityordermanage/addQualityOrder`,
		method: 'post',
		data: data
	})
}

// 修改检验
export function editQualityOrder(data) {
	return request({
		url: `/yokequalityordermanage/editQualityOrder`,
		method: 'post',
		data: data
	})
}


// 获取质检项目
export function getPageQualityItemList(data) {
	return request({
		url: `/yokequalityitemmanage/getPageQualityItemList`,
		method: 'get',
		data: data
	})
}

// 发起检验接口
export function submitQualityOrder(data) {
	return request({
		url: `/yokequalityordermanage/submitQualityOrder`,
		method: 'post',
		data: data
	})
}

// 撤回检验
export function cancelQualityOrder(data) {
	return request({
		url: `/yokequalityordermanage/cancelQualityOrder`,
		method: 'post',
		data: data
	})
}

// 获取检验详情
export function getPageQualityItemById(data) {
	return request({
		url: `/yokequalityordermanage/getQualityOrderItemList/${data}`,
		method: 'get'
	})
}

//获取班次信息
export function getShiftList(data) {
	return request({
		url: `/baseshift`,
		method: 'get',
		data: data
	})
}

// 添加交接班
export function addChange(data) {
	return request({
		url: `/prodChangeShift`,
		method: 'post',
		data: data
	})
}

export function getChange(data) {
	return request({
		url: `/prodChangeShift`,
		method: 'get',
		data: data
	})
}

// 获取实时采集数据
export function getRealTimeData(data) {
	return request({
		url: `/device/data/realTime`,
		method: 'get',
		data: data
	})
}

// 获取历史数采
export function getHistoryData(data) {
	return request({
		url: `/device/data/history`,
		method: 'get',
		data: data
	})
}

// 获取点检任务
export function getRecordDevicePage(data) {
	return request({
		url: `/pda/polling/record/getRecordDevicePage`,
		method: 'get',
		data: data
	})
}

// 点检任务详情
export function getRecordDeviceDetail(data) {
	return request({
		url: `/pda/polling/record/getRecordDevice/${data}`,
		method: 'get'
	})
}

//获取点检检查项
export function getStandardList(data) {
	return request({
		url: `/pda/polling/record/standardList`,
		method: 'get',
		data: data
	})
}

//获取点检检查项
export function getStandardDetailList(data) {
	return request({
		url: `/pda/polling/record/detailList`,
		method: 'get',
		data: data
	})
}

//执行点检任务
export function addrecord(data) {
	return request({
		url: '/pda/polling/record',
		method: 'put',
		data: data
	})
}

// 获取保养任务列表
export function getMaintainList(data) {
	return request({
		url: `/pda/maintain/record/getRecordDevicePage`,
		method: 'get',
		data: data
	})
}
export function getmainRecordDevice(dmdId) {
	return request({
		url: '/pda/maintain/record/getRecordDevice/' + dmdId,
		method: 'get'
	})
}

//获取保养记录设备详情
export function getRecordDetail(dmdId) {
	return request({
		url: '/pda/maintain/record/detailList/' + dmdId,
		method: 'get'
	})
}

//保养执行
export function addmainrecord(data) {
	return request({
		url: '/pda/maintain/record',
		method: 'put',
		data: data
	})
}

// 查询保养标准工作内容列表
export function standardmainList(data) {
	return request({
		url: '/pda/maintain/record/standardList',
		method: 'get',
		data: data
	})
}

//获取保养之后的列表
export function standardmainListDetail(data) {
	return request({
		url: '/pda/maintain/record/detailList/' + data,
		method: 'get',
	})
}

// 根据生产组织获取人员信息
export function getUserListByBpa(data) {
	return request({
		url: '/baseworkteam/userList',
		method: 'get',
		data: data
	})
}

export function getUserListByOpte(data) {
	return request({
		url: '/baseworkteam/' + data,
		method: 'get'
	})
}

// 根据类型获取翻译
export function getTranlateByType(data) {
	return request({
		url: '/lp-map/' + data + '/name?platform=2',
		method: 'get'
	})
}

// 获取产品信息
export function getProdBodyTechLine(data) {
	return request({
		url: `/prodBodyTechLine/detail/${data}`,
		method: 'get',
	})
}

export function getMatailList(data) {
	return request({
		url: `/kingDeeApi/base/api/SYNC_QQT/ERP_INVENTORY`,
		method: 'get',
		data: data
	})
}

//备品备件现存量
export function getPartList(data) {
	return request({
		url: `/stockonhand`,
		method: 'get',
		data: data
	})
}

export function getTagInfo(data) {
	return request({
		url: `/kingDeeApi/base/api/SYNC_QQT/ERP_BarCode`,
		method: 'get',
		data: data
	})
}

// 查询仓库
export function getStockList(data) {
	return request({
		url: `/kingDeeApi/base/api/SYNC_QQT/ERP_STOCK`,
		method: 'get',
		data: data
	})
}

//报工记录撤销
export function revokeReport(data) {
	return request({
		url: `/pad/prod/work/report/${data}`,
		method: 'delete'
	})
}

//获取领料记录
export function getProdPickOrder(data) {
	return request({
		url: `/prodPickOrder/getBodyPage`,
		method: 'get',
		data: data
	})
}

// 获取退料记录
export function getReturnPick(data) {
	return request({
		url: `/prodReturnOrder/getBodyPage`,
		method: 'get',
		data: data
	})
}

// 获取首页统计
export function getunExecuteCount(data) {
	return request({
		url: `/pda/device/index/unExecuteCount`,
		method: 'get',
	})
}

// 获取维修工单
export function getdetailPage(data) {
	return request({
		url: `/repair/record/detailPage`,
		method: 'get',
		data: data
	})
}

// 获取备件列表
export function getstockonhand(data) {
	return request({
		url: `/stockonhand`,
		method: 'get',
		data: data
	})
}

//维修处理
export function solve(data) {
	return request({
		url: '/repair/record/solve',
		method: 'post',
		data: data
	})
}

//维修详情
export function detailSpares(data) {
	return request({
		url: '/repair/record/detail/spares/' + data,
		method: 'get'
	})
}

//查询维修统计数量
export function getdetailCount(data) {
	return request({
		url: `/repair/record/detailCount`,
		method: 'get',
		data: data
	})
}